package com.moss.common.exception;

/**
 * 接口权限异常
 */
public class URIPermissionException extends RuntimeException{

    private static final long serialVersionUID = 1L;

    /**
     * 错误码
     */
    private Integer code;

    /**
     * 错误提示
     */
    private String message;


    /**
     * 空构造方法，避免反序列化问题
     */
    public URIPermissionException()
    {
    }

    public URIPermissionException(String message)
    {
        this.message = message;
    }

    public URIPermissionException(String message, Integer code)
    {
        this.message = message;
        this.code = code;
    }

    @Override
    public String getMessage()
    {
        return message;
    }

    public Integer getCode()
    {
        return code;
    }

    public URIPermissionException setMessage(String message)
    {
        this.message = message;
        return this;
    }
}
